package com.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author fangjx
 * @date 2021/2/9
 */
@RequestMapping("/test")
@RestController
public class TestController2 {   //名字不能叫TestController 因为跟moduleA同包还同类名会报错 要区分开

    @Value("${b}")
    private String b;

    @Value("${a}")
    private String a;

    @GetMapping("/test")
    public void testA(){
        System.out.println(b);
        System.out.println(a);
    }

}
